﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PaySelectPanel : MonoBehaviour {

    public GameObject Collider;
    public GameObject WeiXinBtn;
    public GameObject AlipayBtn;
    public GameObject PaySelect;

    void Awake()
    {
        UIEventListener.Get(Collider).onClick = ButtonClick;
        UIEventListener.Get(WeiXinBtn).onClick = ButtonClick;
        UIEventListener.Get(AlipayBtn).onClick = ButtonClick;
    }

    void ButtonClick(GameObject button)
    {
        if(button.name == "Collider"){
            Destroy(PaySelect);
        }
        else if (button.name == "WeiXinBtn")
        {
            Debug.Log("选择微信支付");
        }
        else if (button.name == "AlipayBtn")
        {
            Debug.Log("选择支付宝支付");
        }
    }
}
